package com.jzx.provider.cv.constants;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @author daihuihui
 * @date 2019/2/2
 * @des 学历枚举
 */
@AllArgsConstructor
public enum Education {
    /**
     * 博士后
     */
    POSTDOC(6, "博士后"),

    /**
     * 博士
     */
    DOCTOR(5, "博士"),

    /**
     * MBA/EMBA
     */
    MBA(4, "MBA/EMBA"),

    /**
     * 硕士
     */
    MASTER(3, "硕士"),

    /**
     * 本科学士
     */
    BACHELOR(2, "本科"),

    /**
     * 大专及以下
     */
    OTHER(1, "大专及以下");

    @Getter
    private Integer value;

    @Getter
    private String name;

    public static String getByValue(Integer val) {
        for (Education education : Education.values()) {
            if (education.getValue().equals(val)) {
                return education.getName();
            }
        }
        return null;
    }
}
